home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpC_1013_Popup < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.2 KB  |  54 lines

  1. %case window field%
  2. %case create%
  3. %case dispose%
  4. %case mousein%
  5.     SetRect (&bounds, %left%, %top%, %right%, %bottom%);
  6.     if (PtInRect (where, &bounds)) {
  7.         TrackPopup (bounds, %popupID%, &cur->%FieldName%);
  8.     }
  9. %case update%
  10.     SetRect (&bounds, %left%, %top%, %right%, %bottom%);
  11.     UpdatePopup (bounds, %popupID%, cur->%FieldName%);
  12. %case activate%
  13. %case track%
  14. %case itemNr%
  15.     %DefineItem%
  16. %case dialog field%
  17.     short%        %%fieldname%;
  18. %case init field%
  19.     info->%fieldname% = 1;
  20. %case auxiliary%
  21.     /*----------*/
  22.     short        x%fieldname%;
  23.     
  24.     /*----------*/
  25.     static pascal void Draw%itemname% (DialogPtr        whichDialog,
  26.                             short            itemNr);
  27.     static pascal void Draw%itemname% (whichDialog, itemNr)
  28.     DialogPtr        whichDialog;
  29.     short            itemNr;
  30.     {
  31.     %if lang = MPW%
  32.     #pragma unused (whichDialog) 
  33.     
  34.     %end if%
  35.         DrawPopup (itemNr, %popupID%, x%fieldname%);
  36.     } /*Draw%itemname%*/
  37.  
  38. %case filter%
  39. %case set%
  40.     x%fieldname% = info->%fieldname%;
  41.     SetUserItem (%itemname%, (ProcPtr) &Draw%itemname%);
  42. %case hit%
  43.     case %itemname%:
  44.             %if not labelName = %
  45.                 InvertLabel (%labelName%);
  46.             %endif%
  47.             DoPopup (%itemname%, %popupID%, &info->%fieldname%);
  48.             x%fieldname% = info->%fieldname%;
  49.             %if not labelName = %
  50.                 InvertLabel (%labelName%);
  51.             %endif%
  52.         break;
  53. %case finish%
  54.